﻿using UnityEngine;
using System.Collections;

namespace PluginIdea
{
    public class InputManager : Singleton<InputManager>
    {
        //common
        //左grab(或左扳机值)
        public float GetLeftGrabVal()
        {
            return SuperController.singleton.GetLeftGrabVal();
        }

        //grab(或右扳机值）
        public float GetRightGrabVal()
        {
            return SuperController.singleton.GetRightGrabVal();
        }

        public bool GetLeftGrab()
        {
            return SuperController.singleton.GetLeftGrab();
        }

        public bool GetRightGrab()
        {
            return SuperController.singleton.GetRightGrab();
        }

        public bool GetLeftGrabRelease()
        {
            return SuperController.singleton.GetLeftGrabRelease();
        }

        public bool GetRightGrabRelease()
        {
            return SuperController.singleton.GetRightGrabRelease();
        }

        //鼠标选择
        public bool GetMouseSelect()
        {
            return SuperController.singleton.GetMouseSelect();
        }

        //鼠标释放
        public bool GetMouseRelease()
        {
            return SuperController.singleton.GetMouseRelease();
        }

        //extension
        public float GetLeftHorizonInput()
        {
            return JoystickControl.GetAxis(JoystickControl.Axis.LeftStickX);
        }
        public float GetRightHorizonInput()
        {
            return JoystickControl.GetAxis(JoystickControl.Axis.RightStickX);
        }

        public float GetLeftVerticalInput()
        {
            return JoystickControl.GetAxis(JoystickControl.Axis.LeftStickY);
        }
        public float GetRightVerticalInput()
        {
            return JoystickControl.GetAxis(JoystickControl.Axis.RightStickY);
        }
    }
}

